import Vue 					      from 'vue'
import Router 				    from 'vue-router'
import WebIndex 			    from '@/components/web/WebIndex'
import CenterIndex 			  from '@/components/web/index/CenterIndex';
import CenterAbout 			  from '@/components/web/about/CenterAbout';
import CenterBusiness 		from '@/components/web/business/CenterBusiness';
import CenterNews 			  from '@/components/web/news/CenterNews'
import CenterNewsInfo 		from '@/components/web/news/CenterNewsInfo'
import CenterHuman 			  from '@/components/web/human/CenterHuman'
import CenterCoutact 		  from '@/components/web/coutact/CenterCoutact'
import Login              from '@/components/back/login/Login'
import Manage             from '@/components/back/manage/Manage'
import BackNews           from '@/components/back/manage/News'
import BackEditNews       from '@/components/back/manage/EditNews'
import Words              from '@/components/back/manage/Words'
import Job                from '@/components/back/manage/Job'
import Editjob            from '@/components/back/manage/Editjob'
import BackMain           from '@/components/back/manage/BackMain'
import Architecture       from '@/components/back/manage/Architecture'
import Scroll             from '@/components/back/manage/Scroll'
import BackEditBanner     from '@/components/back/manage/EditBanner'

Vue.use(Router)

export default new Router({
	mode: 'history',
  routes: [
    {
      path: '/',
      component: WebIndex,
      children: [
        {
          path: '',
          component: CenterIndex
        },
        {
          path: 'about',
          component: CenterAbout
        },
        {
          path: 'about/:id',
          component: CenterAbout
        },
        {
          path: 'business',
          component: CenterBusiness
        },
        {
          path: 'business/:id',
          component: CenterBusiness
        },
        {
          path: 'news',
          component: CenterNews
        },
        {
          path: 'news/:id',
          component: CenterNews
        },
        {
          path: 'newsinfo/:id',
          component: CenterNewsInfo
        },
        {
          path: 'human',
          component: CenterHuman
        },
        {
          path: 'human/:id',
          component: CenterHuman
        },
        {
          path: 'coutact',
          component: CenterCoutact
        },
        {
          path: 'coutact/:id',
          component: CenterCoutact
        }
      ]
    },
    {
      path: '/login',
      component: Login
    },
    {
      path: '/manage',
      component: Manage,
      children:[
        {
          path:'',
          component:BackMain
        },
        {
          path:'news',
          component:BackNews
        },
        {
          path:'editNews',
          component:BackEditNews
        },
        {
          path:'editNews/:newId',
          component:BackEditNews
        },
        {
          path:'words',
          component:Words
        },
        {
          path:'job',
          component:Job
        },
        {
          path:'editjob',
          component:Editjob
        },
        {
          path:'editjob/:jobId',
          component:Editjob
        },
        {
          path:'architecture',
          component:Architecture
        },
        {
          path:'scroll',
          component:Scroll
        },
        {
          path:'editBanner',
          component:BackEditBanner
        },
        {
          path:'editBanner/:bannerId',
          component:BackEditBanner
        },
      ]
    }
  ]
})
